import unittest
from test.test_register import TestRegister
import parameterized

datas = TestRegister.get_reg_data() # 读取数据

class WebTourTest(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        cls.tg = TestRegister()
    @classmethod
    def tearDownClass(cls):
        pass

    def setUp(self):
        self.tg.open() # 把浏览器打开

    def tearDown(self):
        self.tg.driver.close() # 把浏览器关闭

    @parameterized.parameterized.expand(datas)  # [[],[]]
    def test_register(self, account, pwd):
        text = self.tg.test_resgister(account, pwd)
        self.assertIn("Thank you", text)



if __name__ == '__main__':
    unittest.main(verbosity=2)
